using System.Collections.Generic;
using Moq;
using NUnit.Framework;
using RMH.DataAccess;
using RMH.Entities;
using RMH.Services;

namespace RMH.UnitTests.Services
{
    [TestFixture]
    public class StayService_when_getting_current_stays : base_automock_test
    {
        private IStayService stayService;
        private IList<Stay> stays = new List<Stay>();
        private IList<Stay> returnedStays;

        public override void establish_context()
        {
            Mock<IStayRepository>()
                .Setup(r => r.GetCurrentStays())
                .Returns(stays);
        }

        public override void because()
        {
            returnedStays = Create<StayService>().GetCurrent();
        }

        [Test]
        public void searches_repository_for_stays_started_before_today_and_not_yet_complete()
        {
            returnedStays.ShouldEqual(stays);
        }
    }
}